package com.bt.lms.ui.page.sys.style.action.btn;

import com.bt.lms.ui.page.sys.style.BtnStyle;
import javafx.event.EventHandler;
import javafx.scene.control.Button;
import javafx.scene.input.MouseEvent;

/**
 * 取消按钮的鼠标移出事件
 */
public class CancelBtnExitedAction implements EventHandler<MouseEvent> {

    /**
     * 按钮
     */
    private final Button cancelBtn;

    /**
     * 构建事件
     * @param cancelBtn 取消按钮
     */
    public CancelBtnExitedAction(Button cancelBtn) {
        this.cancelBtn = cancelBtn;
    }

    /**
     * 事件实现
     * @param event the event which occurred
     */
    @Override
    public void handle(MouseEvent event) {
        BtnStyle.cancelBtn(cancelBtn);
    }
}
